/*
 * @Description: 处理页面头部
 */
import globalMethods from '@/plugins/methods';

export default ({ service, request, tools }) => ({
    /**
     * @description: 致信交流，是否弹出提示
     * @param {*}
     * @return {*}
     */
    summaryTopZhixinCheckShowTip() {
        return request({
            url: `${globalMethods.getLocationOrigin()}/seeyon/ajax.do`,
            method: 'post',
            params: {
                method: 'ajaxAction',
                managerName: 'zxAuthManager',
                rnd: Math.random(),
            },
            data: 'managerMethod=getWakeTip&arguments=[]',
        });
    },
    /**
     * @description: 致信交流，获取唤起数据
     * @param {*}
     * @return {*}
     */
    summaryTopZhixinGetOpenData() {
        return request({
            url: `${globalMethods.getLocationOrigin()}/seeyon/ajax.do`,
            method: 'post',
            params: {
                method: 'ajaxAction',
                managerName: 'zxTicketManager',
                rnd: Math.random(),
            },
            data: 'managerMethod=getLoginTicket&arguments=[]',
        });
    },
    /**
     * @description: 致信交流，是否不再提醒
     * @param {Number}checked 0 就是不再提醒 1提醒
     * @return {*}
     */
    summaryTopZhixinTip(checked) {
        return request({
            url: `${globalMethods.getLocationOrigin()}/seeyon/ajax.do`,
            method: 'post',
            params: {
                method: 'ajaxAction',
                managerName: 'zxAuthManager',
                rnd: Math.random(),
            },
            data: `managerMethod=saveWakeTip&arguments=[${checked}]`,
        });
    },
    /**
     * @description: 获取发起电话会议
     * @param {*}
     * @return {*}
     */
    summaryTopTeleconferencing() {
        return request({
            url: `${globalMethods.getLocationOrigin()}/seeyon/ajax.do`,
            method: 'post',
            params: {
                method: 'ajaxAction',
                managerName: 'multiCallManager',
                rnd: Math.random(),
            },
            data: 'managerMethod=isInConferenceCall&arguments=[]',
        });
    },

    /**
     * 即时会议 获取个人会议信息
     * @returns {*}
     */
    summaryTopInstanceMeetingConfig() {
        return request({
            url: `${globalMethods.getLocationOrigin()}/seeyon/rest/meetingComponent/findMeetingInstant`,
            method: 'get',
            params: {
                'option.n_a_s': '1',
                rnd: Math.random(),
            },
            data: {},
        });
    },


    /**
     * 即时会议 获取个人会议信息
     * @returns {*}
     */
    summaryTopInstanceMeetingSend(data) {
        return request({
            url: `${globalMethods.getLocationOrigin()}/seeyon/rest/meetingComponent/sendMeetingInstant`,
            method: 'post',
            params: {
                'option.n_a_s': '1',
                rnd: Math.random(),
            },
            data: data,
        });
    },
});
